* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
  background-color: #f7f9fc;
  color: #333;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* 海洋背景Canvas样式 */
#ocean-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  position: relative;
  z-index: 1;
}

h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 2.5rem;
  position: relative;
  padding-bottom: 15px;
}

h1 strong {
  color: #3498db;
}

h1:after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3498db, #9b59b6);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

h2 {
  margin: 25px 0 15px;
  color: #3498db;
  font-size: 1.6rem;
}

h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.input-section {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

input[type="text"] {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.customization-section {
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.option-group {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.option-group label {
  min-width: 120px;
  margin-right: 15px;
  font-weight: 500;
}

.option-group input,
.option-group select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  flex: 1;
  max-width: 300px;
}

.option-group select {
  cursor: pointer;
  background-color: white;
}

/* 文件上传样式 */
.file-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 500px;
}

#custom-logo-upload {
  display: none;
}

#file-upload-btn {
  padding: 8px 15px;
  background-color: #4caf50;
  flex-shrink: 0;
}

#file-upload-btn:hover {
  background-color: #45a049;
}

#file-name {
  font-size: 14px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.themes {
  margin-top: 20px;
}

.theme-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.theme-btn {
  padding: 10px 15px;
  background-color: #f1f1f1;
  color: #333;
  border: 2px solid transparent;
  transition: all 0.3s;
  min-width: 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-bottom: 10px;
}

.theme-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  transition: all 0.6s;
  z-index: -1;
}

.theme-btn:hover::before {
  transform: translateX(100%);
}

.theme-btn:hover {
  background-color: #e5e5e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.theme-btn.active {
  border-color: #3498db;
  background-color: rgba(52, 152, 219, 0.1);
  transform: scale(1.05);
  font-weight: bold;
}

.result-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

.qr-wrapper {
  margin-bottom: 25px;
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  background-color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

#qrcode {
  margin: 15px auto;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

#qrcode img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

#qrcode img:hover {
  transform: scale(1.02);
}

#download-btn {
  padding: 15px 40px;
  font-size: 18px;
  background-color: #27ae60;
  border-radius: 30px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

#download-btn:hover {
  background-color: #2ecc71;
  transform: translateY(-3px);
  box-shadow: 0 7px 15px rgba(46, 204, 113, 0.3);
}

#download-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(46, 204, 113, 0.3);
}

/* 主题样式 */
.qr-wrapper.classic {
  background-color: white;
}

.qr-wrapper.blue {
  background: linear-gradient(135deg, #e0f7ff 0%, #f5fcff 100%);
}

.qr-wrapper.flower {
  background-color: #fff5f7;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffc8d8' fill-opacity='0.4'%3E%3Cpath d='M10 0C4.5 0 0 4.5 0 10s4.5 10 10 10 10-4.5 10-10S15.5 0 10 0zm0 18c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8z'/%3E%3C/g%3E%3C/svg%3E");
}

.qr-wrapper.elegant {
  background: linear-gradient(135deg, #f8f8f8 0%, #fff 100%);
  border: 1px solid #e2d3b3;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.qr-wrapper.neon {
  background-color: #0f0f1e;
  box-shadow: 0 0 15px rgba(114, 137, 218, 0.5), 0 0 30px rgba(114, 137, 218, 0.3);
}

.qr-wrapper.neon #qr-display-title {
  color: #fff;
  text-shadow: 0 0 5px #7289da, 0 0 10px #7289da;
}

/* 新增主题样式 */
.qr-wrapper.cyberpunk {
  background-color: #021b29;
  box-shadow: 0 0 20px rgba(5, 217, 232, 0.5);
  border: 2px solid #05d9e8;
  position: relative;
  overflow: hidden;
}

.qr-wrapper.cyberpunk::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 2px;
  background: #ff2a6d;
  top: 10px;
  left: -25%;
  box-shadow: 0 0 15px 3px #ff2a6d;
  animation: cyberpunk-scan 4s linear infinite;
}

@keyframes cyberpunk-scan {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(300px);
  }
}

.qr-wrapper.cyberpunk #qr-display-title {
  color: #fff;
  text-shadow: 0 0 5px #ff2a6d, 0 0 10px #ff2a6d;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.qr-wrapper.galaxy {
  background-color: #000000;
  box-shadow: 0 0 25px rgba(93, 74, 244, 0.6);
  overflow: hidden;
  position: relative;
}

.qr-wrapper.galaxy::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 20px 20px;
}

.qr-wrapper.galaxy #qr-display-title {
  color: #fff;
  text-shadow: 0 0 5px #5d4af4, 0 0 10px #5d4af4;
}

.qr-wrapper.gradient {
  background: linear-gradient(135deg, #ff8177 0%, #ff867a 25%, #ff8c7f 50%, #ff9a8b 75%, #ffb199 100%);
  box-shadow: 0 10px 20px rgba(255, 154, 139, 0.3);
}

.qr-wrapper.gradient #qr-display-title {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 15px;
  }

  .input-section {
    flex-direction: column;
  }

  .theme-buttons {
    justify-content: center;
  }

  .option-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .option-group label {
    margin-bottom: 5px;
  }

  .option-group input,
  .option-group select {
    width: 100%;
    max-width: none;
  }

  .file-upload-wrapper {
    max-width: none;
    width: 100%;
  }
}